﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using ESRI.ArcGIS.Client;
using GISforTT_API;

namespace eGrid_App
{
    public class TroubleTicketGraphicLayer : GraphicsLayer, ClonableLayer
    {
        public Dictionary<int, TroubleTicket> tickets;
        public TroubleTicketServerLayer serverLayer;

        // TroubleTicketGraphicLayers are not cloned, instead they are created as the clones of TroubleTicketServerLayers
        public Layer CloneLayer()
        {
            return serverLayer.CloneLayer();
        }


        public void ChangeTicketGraphic(int ticketID, int severity)
        {
                TroubleTicket ticket = tickets[ticketID];
                ticket.Priority = severity;
        }

        ~TroubleTicketGraphicLayer()
        {
            //TicketSeverity -= severityDelegate;
        }

    }
}

